package homework1;

class Point{
	double x,y,z;
	public double distance(Point p) {
		double a = Math.sqrt((p.x-x)*(p.x-x)+(p.y-y)*(p.x-x)+(p.z-z)*(p.z-z));
		return a;
	}
	public Point(double a,double b,double c){
		x = a;
		y = b;
		z = c;
	}
}

public class Calculatedistance {
	public static void main(String[] args) {
		Point p1 = new Point(1,2,3);
		Point p2 = new Point(8,9,10);
		double result = p1.distance(p2);
		System.out.println("Distance between two points is:" + result);
	}
}

